package com.wealth.lottery.service;

import iaas.service.IBaseService;
import iaas.utils.ResultObject;

import java.util.List;

import org.springframework.stereotype.Component;

import com.wealth.lottery.entity.LotteryActivity;
/**
 * ILotteryActivityService
 * @author lihang 2016-06-27
 *
 */
@Component
public interface ILotteryActivityService extends IBaseService<LotteryActivity>{
	/**
	 * 查询该企业下，正在启用的抽奖活动
	 * @param corpid
	 * @return LotteryActivity对象
	 */
	LotteryActivity  getByCorpId(Long corpid,int type) throws Exception;

	/**
	 * 查询该企业下所有启用的活动
	 */
	List<LotteryActivity> findByCorpIdAndStatus(Long corpid,Integer status) throws Exception;

	/**
	 * 根据类型查询该企业下所有启用的活动
	 */
	List<LotteryActivity> findByCorpIdAndStatusAndType(Long corpid,Integer status,Integer type) throws Exception;
	
	/**查询所有的抽奖活动*/
	List<LotteryActivity> getByStatus() throws Exception;
	
	List<LotteryActivity> getByStatusNot() throws Exception;
	
	/**查询正在启用的通用的抽奖活动*/
	LotteryActivity getByStatusAndCurrency(Long corpid) throws Exception;
	/**查询所有的没有被删除的通用活动*/
	List<LotteryActivity> getByStatusAndCurrencyAll(Long corpid) throws Exception;
	
	
	/**通选是否能抽奖*/
	ResultObject getByScoreGt(Double money,Long corpid,Long memberid) throws Exception;

}
